theme_plot <- function(base_size = 11) {
theme_minimal(base_size = base_size) +
theme(
plot.title = element_text(face = "bold",
family = "outfit",
color = "#2d2a26",
size = base_size + 1,
hjust = 0.5
),
plot.subtitle = element_text(face = "italic",
family = "outfit",
color = "#51534a",
size = base_size - 1,
hjust = 0.5,
margin = margin(b = 0.5, unit = "cm")
),
plot.caption = element_text(face = "italic",
family = "anonymous",
color = "#9b9e98",
size = base_size - 2
),
legend.position = "bottom",
panel.grid.major = element_line(colour = "#d4d2cd"),
panel.grid.minor = element_line(colour = "#d4d2cd"),
axis.text = element_text(face = "italic",
family = "anonymous",
size = base_size - 2,
hjust = 0.5
),
axis.title = element_text(face = "bold",
family = "anonymous",
size = base_size - 1,
hjust = 0.5
),
axis.title.y = element_text(margin = margin(r = 0.5, unit = "cm")
),
axis.title.x = element_text(margin = margin(t = 0.5, unit = "cm")
),
legend.title = element_text(face = "italic",
family = "anonymous",
size = base_size - 1,
hjust = 0.5
),
legend.title.position = "top",
legend.text = element_text(face = "italic",
family = "anonymous",
size = base_size - 2,
hjust = 0.5
),
legend.key.width = unit(2, "cm"),
legend.key.height = unit(0.5, "cm"),
legend.background = element_rect(fill = "#f5f4f0", color = "#f5f4f0"),
plot.background = element_rect(fill = "#f5f4f0", color = "#f5f4f0"),
panel.background = element_rect(fill = "#f5f4f0", color = "#f5f4f0"),
plot.margin = unit(c(1, 1, 1, 1), "cm")
)
}
theme_map <- function(base_size = 11) {
theme_minimal(base_size = base_size) +
theme(
plot.title = element_text(face = "bold",
family = "outfit",
color = "#2d2a26",
size = base_size + 1,
hjust = 0.5
),
plot.subtitle = element_text(face = "italic",
family = "outfit",
color = "#51534a",
size = base_size - 1,
hjust = 0.5,
margin = margin(b = 0.5, unit = "cm")
),
plot.caption = element_text(face = "italic",
family = "anonymous",
color = "#9b9e98",
size = base_size - 3
),
legend.position = "bottom",
panel.grid.major = element_blank(),
panel.grid.minor = element_blank(),
axis.text = element_blank(),
axis.title = element_blank(),
legend.title = element_text(face = "italic",
family = "anonymous",
size = base_size - 1,
hjust = 0.5
),
legend.title.position = "top",
legend.text = element_text(face = "italic",
family = "anonymous",
size = base_size - 3,
hjust = 0.5
),
legend.key.width = unit(2, "cm"),
legend.key.height = unit(0.5, "cm"),
legend.background = element_rect(fill = "#f5f4f0", color = "#f5f4f0"),
plot.background = element_rect(fill = "#f5f4f0", color = "#f5f4f0"),
panel.background = element_rect(fill = "#f5f4f0", color = "#f5f4f0"),
plot.margin = unit(c(1, 1, 1, 1), "cm")
)
}